<template>
  <h1 v-show="!isLogin" @click="toLogin">请先登录</h1>
  <h1 v-show="isLogin"> 你已经登录了哟！</h1>
</template>

<script setup>

import {ref} from "vue";

const isLogin = ref(false)

const toLogin = () => {
  isLogin.value = true
  alert("登录成功")
}
</script>


<style scoped>

</style>